 <!--<button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent" (click)="backToPolicyList()">
          Back to Policy List
</button>-->

<div class="mdl-grid">
    <div class="mdl-cell mdl-shadow--2dp mdl-cell--3-col mdl-cell--4-col-phone mdl-cell--8-col-tablet" *ngIf="isContentsAvailable">
        <div class="mdl-card__title title container-title-details">
            <h2 class="mdl-card__title-text title-details">Policy Documents</h2>
        </div>
        
      <alfresco-document-list
        [currentFolderId]="policyNodeId"
        [contextMenuActions]="false"
        [contentActions]="false"
        (error)="onNavigationError($event)"
        (success)="resetError()"
        (preview)="showFile($event)">
        <content-columns>
          <content-column key="$thumbnail" type="image"></content-column>
          <content-column
            title="{{'DOCUMENT_LIST.COLUMNS.DISPLAY_NAME' | translate}}"
            key="name"
            sortable="true"
            class="full-width ellipsis-cell">
          </content-column>
        </content-columns>
      </alfresco-document-list>
      <alfresco-upload-button data-automation-id="single-file-upload"
                              [rootFolderId]="policyNodeId"
                              [versioning] = "true"
                              (onSuccess)="documentList.reload()">
      </alfresco-upload-button>
    </div>
    
      
    <div class="mdl-cell mdl-shadow--2dp" [class.mdl-cell--12-col]="!isContentsAvailable"
         [class.mdl-cell--9-col]="isContentsAvailable">
        <div class="mdl-card__title title container-title-details">
            <h2 class="mdl-card__title-text title-details">Policy Details</h2>
            <button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent" (click)="startNewClaim()">
          Start New Claim
        </button>
        </div>
        <activiti-form
            [readOnly]="true"
            [formId]="policyDetailsFormId"
            [showValidationIcon]="false"
            [data]="policyDetails"
            [showTitle]="false"
            [showSaveButton]="false"
            [showDebugButton]="false"
            [showRefreshButton]="false">
        </activiti-form>
 </div>
 <file-uploading-dialog #fileDialog></file-uploading-dialog>

<div *ngIf="fileShowed">
  <alfresco-viewer [(showViewer)]="fileShowed"
                   [fileNodeId]="fileNodeId"
                   [overlayMode]="true">

    <extension-viewer [supportedExtensions]="['obj','3DS']" #extension>
      <template let-urlFileContent="urlFileContent" let-extension="extension" >
        <threed-viewer [urlFile]="urlFileContent" [extension]="extension" ></threed-viewer>
      </template>
    </extension-viewer>

  </alfresco-viewer>
</div>
